package com.jk.smartelderlycare.service.impl;

import com.jk.smartelderlycare.dao.SysMenuMapper;
import com.jk.smartelderlycare.dto.SysMenu;
import com.jk.smartelderlycare.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author hhk
 * @version 1.0
 * @ClassName SysMenuServiceImpl
 * @program: smart-elderly-care
 * @description: TODO
 * @date 2024/11/6 16:30
 */
@Service
public class SysMenuServiceImpl implements SysMenuService {
    @Autowired
    private  SysMenuMapper sysMenuMapper;
    /** 
     * @description: 查询菜单集合信息
     * @param: [sysMenu]
     * @return: java.util.List<com.jk.smartelderlycare.dto.SysMenu>
     * @author hhk
     * @date: 2024/11/6 16:31
     */ 
    @Override
    public List<SysMenu> findSysMenuList(SysMenu sysMenu) {
        return sysMenuMapper.selectList(null);
    }

    /** 
     * @description: 通过用户id获取权限集合
     * @param: [userId]
     * @return: java.util.List<java.lang.String>
     * @author hhk
     * @date: 2024/11/6 16:32
     */ 
    @Override
    public List<String> selectPermsByUserId(Long userId) {
        return sysMenuMapper.selectPermsByUserId(userId);
    }
}
